import {ref} from 'vue'
import {defineStore} from 'pinia'

export const useLoginStore = defineStore('login',()=>{

    const username = ref('');

    const pwd = ref('');


   //登陆行为
    function isLogin(){
        console.log('账号:',username.value);
        console.log('密码:',pwd.value);
        if(username.value=='admin' && pwd.value=='123'){
            return true;
        }
        return false;
    }
    return{username,pwd,isLogin}
},{
    persist:true
});